<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>点击按钮, 次数联动变化</title>
    <script src="js/vue.js"></script>
</head>
<body>
<h1>
    演示Vue事件绑定操作
</h1>

<div id="app">
    <button v-on:click="addOne()">点击增加+1</button><br>
    <button v-on:click="addTwo()">点击增加+2</button><br>
    <button v-on:click="clickCount += 3">点击增加+3</button><br>
    你的按钮被点了{{clickCount}}次
</div>

<script>
    let vm = new Vue({
        el:"#app",
        data:{
            clickCount:0
        },
        methods:{
            addOne(){
                this.clickCount += 1;
            },
            addTwo(){
                this.clickCount += 2;
            }
        }
    })
</script>

</body>
</html>